CREATE TABLE [dbo].[TDMOBA_DETR]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NOT NULL,
[AA_BNCO] [dbo].[TD_VC_004] NOT NULL,
[MM_BNCO] [dbo].[TD_VC_002] NOT NULL,
[TI_MOVI_BANC] [dbo].[TD_VC_001] NOT NULL,
[NU_COMP_BANC] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDMOBA_DE__NU_SE__390E6C01] DEFAULT ((0)),
[NU_CONS_DETR] [dbo].[TD_VC_020] NULL,
[NU_RUCS_DETR] [dbo].[TD_VC_020] NULL,
[IM_MOVI_DETR] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDMOBA_DE__IM_MO__3A02903A] DEFAULT ((0)),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TDMOBA_DE__CO_US__3AF6B473] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDMOBA_DE__FE_US__3BEAD8AC] DEFAULT (getdate()),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TDMOBA_DE__CO_US__3CDEFCE5] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDMOBA_DE__FE_US__3DD3211E] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDMOBA_DETR] ADD CONSTRAINT [PK__TDMOBA_D__FF89FA267148A383] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDMOBA_DETR] ADD CONSTRAINT [FK__TDMOBA_DETR__5497563C] FOREIGN KEY ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC]) REFERENCES [dbo].[TCMOBA_DETR] ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC])
GO
